import store from '@/store'

export default {
  bind (el, binding, vnode) {
    const auths = store.getters.auths.map(it => it.menuCode)
    const hasAuth = auths.includes(binding.value)
    if (hasAuth) {
      delete el.style.display
    } else {
      el.style.display = 'none'
    }
  }
}
